<?php
/**
 * Description of _services
 * 
 * @author trongkhoi
 * @since Sep 17, 2013 - 10:33:19 AM
 */
?>
<div class="row-fluid">
    <div class="span2"></div>
    <div class="box span10">
        <div class="box-header">
            <h2><i class="icon-list"></i>Services list assigned to this staff</h2>
        </div>
        <div class="box-content table-responsive">
            <?php if ($service_staff): ?>
                <table class="table table-bordered table-striped table-condensed">
                    <thead>
                        <tr>
                            <th></th>
                            <th>Name</th>
                            <th>Duration</th>
                            <th class="text-right">Price</th>
                            <th></th>                 
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($service_staff as $item): ?>
                            <tr data="<?php $item->sid ?>">
                                <td class="text-center">
                                    <a target="_blank" href="<?php echo $item->service->editUrl ?>">
                                        <img class="thumb_on_list"
                                             src="<?php echo $item->service->getImageService50($item->service->avatar) ?>" />
                                    </a>
                                </td>
                                <td class="center">
                                    <a target="_blank" href="<?php echo $item->service->editUrl ?>"><?php echo $item->service->s_name ?></a></td>
                                <td class="center">
                                    <?php echo $item->service->durationTime ?>
                                </td>
                                <td class="center text-right">
                                    $<?php echo $item->service->priceFormat ?>
                                </td>
                                <td class="center">
                                    <a title="Unassign" class="btn btn-danger" 
                                       href="<?php
                                       echo Yii::app()->createUrl('ServiceStaff/remove', array(
                                           'pk' => $item->id
                                       ));
                                       ?>">
                                        <i class="icon-trash "></i>
                                    </a>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>

            <?php endif; ?>

        </div>
    </div>
</div>
<script src="<?php echo $this->assetDir ?>js/kdt/service.js"></script>